package com.zycfc.zsf.boot.office.excel.constant;

import com.zycfc.zsf.boot.exception.*;

public enum OfficeExceptionCode implements IExceptionCode
{
    ERROR1000("\u5f53\u524d\u8def\u5f84excel\u6a21\u677f\u6587\u4ef6\u4e0d\u5b58\u5728", "1000"), 
    ERROR1001("\u83b7\u53d6excel\u6a21\u677f\u6587\u4ef6\u5f02\u5e38", "1001"), 
    ERROR1002("excel\u6a21\u677f\u6587\u4ef6\u540d\u79f0\u4e3a\u7a7a", "1002"), 
    ERROR1003("excel\u6587\u4ef6\u7c7b\u578b\u9519\u8bef", "1003"), 
    ERROR1004("\u5bfc\u51faexcel\u6587\u4ef6\u540d\u79f0\u4e3a\u7a7a", "1004"), 
    ERROR1005("\u4e0a\u4f20excel\u6587\u4ef6\u8def\u5f84\u4e3a\u7a7a", "1005"), 
    ERROR1006("\u5199\u5165\u6570\u636e\u8d77\u59cb\u884c\u9519\u8bef", "1006"), 
    ERROR1007("excel\u6a21\u677f\u6587\u4ef6\u8def\u5f84\u4e3a\u7a7a", "1007"), 
    ERROR1008("\u8bfb\u53d6\u6587\u4ef6\u6d41\u5931\u8d25", "1008"), 
    ERROR1009("\u5199\u5165\u6587\u4ef6\u6d41\u9519\u8bef", "1009"), 
    ERROR1010("\u5173\u95ed\u6587\u4ef6\u6d41\u9519\u8bef", "1010"), 
    ERROR1099("\u5bfc\u51faexcel\u6570\u636e\u5f02\u5e38", "1099"), 
    ERROR2000("\u83b7\u53d6excel\u6587\u4ef6\u5931\u8d25", "2000"), 
    ERROR2001("\u5bfc\u5165\u5217\u540d\u4e3a\u7a7a", "2001"), 
    ERROR2002("\u5bfc\u5165\u7684excel\u6587\u4ef6\u7c7b\u578b\u9519\u8bef", "2002"), 
    ERROR2003("\u5bfc\u5165\u6570\u636e\u5217\u7684\u8bfb\u53d6\u7c7b\u578b\u4e3a\u7a7a", "2003"), 
    ERROR2004("\u5bfc\u5165\u6570\u636e\u8d77\u59cb\u884c\u9519\u8bef", "2004"), 
    ERROR2005("\u5bfc\u5165\u6570\u636e\u4e0e\u5217\u7684\u8bfb\u53d6\u7c7b\u578b\u5339\u914d\u9519\u8bef", "2005"), 
    ERROR2006("\u5bfc\u5165\u6570\u636e\u9a8c\u8bc1\u65b9\u5f0f\u9519\u8bef", "2006"), 
    ERROR2007("\u5bfc\u5165\u6570\u636e\u9a8c\u8bc1\u5f02\u5e38", "2007"), 
    ERROR2008("\u6a21\u677f\u9519\u8bef\uff01\u8bf7\u91cd\u65b0\u4e0b\u8f7d\uff01", "2008"), 
    ERROR2099("\u5bfc\u5165excel\u6570\u636e\u5f02\u5e38", "2099"), 
    DATA_VALID_ERROR("\u6570\u636e\u5f02\u5e38", "1000006"), 
    login_error("\u767b\u9646\u5931\u8d25", "1020007");
    
    private final String value;
    private final String message;
    
    private OfficeExceptionCode(final String message, final String value) {
        this.value = value;
        this.message = message;
    }
    
    public static OfficeExceptionCode getValue(final String value) {
        if (null == value) {
            return null;
        }
        for (final OfficeExceptionCode item : values()) {
            if (value.equals(item.value)) {
                return item;
            }
        }
        return null;
    }
    
    public String getValue() {
        return this.value;
    }
    
    public String getMessage() {
        return this.message;
    }
}
